/**配置OAuth2资源服务器（Resource Server）,即受保护的服务
 * 1.核心依赖：spring-cloud-starter-oauth2（含spring-cloud-starter-security和spring-security-jwt）
 * 2.启动类main上@EnableResourceServer注解之，标明该服务受到保护
 * 3.建立@Configuration注解的Resource Server配置文件，继承ResourceServerConfigurerAdapter，覆写其中至少一个方法，以配置验证规则
 *   1）configure(HttpSecurity http) 用来配置哪些服务需要怎样的验证方式
 * 4.在yml中配置security.oauth2.resource.user-info-uri属性，指向验证user的地址
 */
package com.example.demoauthinternalservice;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.SecurityProperties;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;

@SpringBootApplication
@EnableEurekaClient
public class DemoAuthInternalServiceApplication {

    public static void main(String[] args) {
        SpringApplication.run(DemoAuthInternalServiceApplication.class, args);
    }

}
